home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 127 / 127.d81 / b.file cpr (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  3KB  |  145 lines

  1. 10 dv=peek(186):ifdv<8thendv=8
  2. 20 dima$(255),g$(16):bk$=" [146]"
  3. 30 fori=1to16:s$=s$+chr$(160):next
  4. 40 print"[147][159]":poke53280,0:poke53281,0
  5. 50 ty$(1)="[211][197][209]":ty$(2)="[208][210][199]":ty$(3)="[213][211][210]":ty$(4)="[210][197][204]":ty=2
  6. 60 nd$="":fori=1to16:nd$=nd$+chr$(0):next
  7. 70 dt$(0)="1541/1571 type directory"
  8. 80 dt$(1)="1581 type directory   "
  9. 90 dt$(2)="[195][205][196] [206]ative mode directory"
  10. 100 td(0)=18:sd(0)=1
  11. 110 td(1)=40:sd(1)=3
  12. 120 td(2)=1:sd(2)=34
  13. 130 goto740
  14. 140 :
  15. 150 :rem print at
  16. 160 :
  17. 170 poke211,x:poke214,y:sys58732:return
  18. 180 :
  19. 190 :rem read disk
  20. 200 :
  21. 210 open15,dv,15,"i0":gosub580
  22. 220 open1,dv,2,"#":gosub580
  23. 230 t=td(dt):s=sd(dt)
  24. 240 print#15,"u1:";2;0;t;s:gosub580
  25. 250 fori=0to255
  26. 260 get#1,a$(i):ifa$(i)=""thena$(i)=chr$(0)
  27. 270 next
  28. 280 f=0
  29. 290 b=32*f+4:ff$=""
  30. 300 fori=1to16
  31. 310 ff$=ff$+a$(b+i):next
  32. 320 ifasc(a$(b-2))=0then1140
  33. 330 f=f+1:iff<8then290
  34. 340 t=asc(a$(0)):ift=0then1340
  35. 350 s=asc(a$(1)):goto240
  36. 360 print"[147][150]          [215][160][193][160][210][160][206][160][201][160][206][160][199][160]![160]![160]"
  37. 370 print"[159]         [196]o not turn off drive
  38. 380 [153]"      until activity light is off!
  39. 390 print"[158]          [208]lease press a key."
  40. 400 wait198,1
  41. 410 :
  42. 420 :rem write right here
  43. 430 :
  44. 440 b=b-2:print#15,"b-p:";2;b
  45. 450 print#1,chr$(128+ty);
  46. 460 print#15,"u2:";2;0;t;s:gosub580
  47. 470 print:print:print"[159][214]alidating disk ...."
  48. 480 print#15,"v":gosub580
  49. 490 close1:close15
  50. 500 print"[147]  "ff$"[159] has been revived!
  51. 510 [153]"  (NULL)se a copier to transfer it to
  52. 520 print"  another disk.  [208]ress a key.
  53. 522 [151]198,0
  54. 530 [161]a$:[139]a$[178]""[167]530
  55. 540 [138]
  56. 550 :
  57. 560 :[143] read error
  58. 570 :
  59. 580 [132]15,en,em$,et,es
  60. 590 [139]en[178]0[167][142]
  61. 600 [153]"loaddef"em$:[160]1:[160]15
  62. 610 [153]"open  (NULL)esuscitation failed because of the "
  63. 620 [153]"  error.  right$f you can correct the error"
  64. 630 [153]"  run the program again."
  65. 640 [153]"  right$f error occurred during validating,"
  66. 650 [153]"  check directory.  right$f file name is"
  67. 660 [153]"  there, file may be ok.  (NULL)ry it."
  68. 670 [153]"  right$f it works, copy it to another"
  69. 680 [153]"  disk.  (NULL)ress a key."
  70. 682 [151]198,0
  71. 690 [161]a$:[139]a$[178]""[167]690
  72. 700 [138]
  73. 710 :
  74. 720 :[143] start screen
  75. 730 :
  76. 740 [153]"loadlist      (NULL)atn(NULL)(NULL)right$lenval mid$(NULL)(NULL)val(NULL)' (NULL)&str$ ascright$(NULL)val len(NULL)(NULL)
  77. 750 print:print"[159]  [212]his program writes to the disk."
  78. 760 print"  [217]ou should be working with a [195][207][208][217]
  79. 770 [153]"open  of the disk which has a scratched
  80. 780 print"  file you want unscratched.
  81. 800 [153]"list           lenontinue?  (ylist/nlist)"
  82. 810 [161]a$:[139]a$[178]""[167]810
  83. 820 [139]a$[178]"y"[176]a$[178]"(NULL)"[167]940
  84. 830 [153]"open      (NULL)o try again enter (NULL)(NULL)(NULL).":[128]
  85. 940 [153]"load"
  86. 950 [153]"list (NULL)elect drive to be used"
  87. 960 [153]"  1.open (NULL)oggle str$evice # sys   cmdcmdcmd"dv
  88. 970 [153]"  2.open atnccept
  89. 980 print"  3.[159] [209]uit
  90. 990 [161]a$:[139]a$[178]""[167]990
  91. 1000 [139]a$[179]"1"[176]a$[177]"3"[167]990
  92. 1010 [145][197](a$)[137]1020,1040,830
  93. 1020 dv[178]dv[170]1:[139]dv[178]17[167]dv[178]8
  94. 1030 [137]950
  95. 1040 [153]"list        (NULL)lace disk in drive"dv
  96. 1050 [153]"list          and press any key.
  97. 1060 geta$:ifa$=""then1060
  98. 1070 gosub1380
  99. 1080 print"[155]        [212]his will take a while.
  100. 1090 [153]"def         (NULL)(NULL)valatn(NULL)valclosepeekvalclose(NULL)atn(NULL)right$val(NULL)(NULL)!!!
  101. 1100 goto210
  102. 1110 :
  103. 1120 :rem is this it?
  104. 1130 :
  105. 1140 ifff$=nd$then330
  106. 1150 print"[147][159]     "ff$
  107. 1160 print:print"[155]   [201]s this the file? (y[155]/n[155])
  108. 1170 [161]a$:[139]a$[178]""[167]1170
  109. 1180 [139]a$[178]"y"[176]a$[178]"(NULL)"[167] 1210
  110. 1190 [139]a$[178]"n"[176]a$[178]"(NULL)"[167][153]"load":[137]330
  111. 1200 [137]1170
  112. 1210 [153]"load"
  113. 1220 [153]"list (NULL)elect file type
  114. 1230 print"  1.[159] [212]oggle type    [158]"ty$(ty)
  115. 1240 print"  2.[159] [193]ccept
  116. 1250 [153]"  3.open (NULL)uit
  117. 1260 geta$:ifa$=""then1260
  118. 1270 ifa$<"1"ora$>"3"then1260
  119. 1280 onval(a$)goto1290,360,830
  120. 1290 ty=ty+1:ifty=05thenty=1
  121. 1300 goto1220
  122. 1310 :.
  123. 1320 :rem no more files
  124. 1330 :
  125. 1340 print"[147][155]    [212]here are no more deleted files.":close1:close15:goto830
  126. 1350 :
  127. 1360 :rem check drive type
  128. 1370 :
  129. 1380 open2,dv,2,"$"
  130. 1390 get#2,a$
  131. 1400 close2
  132. 1404 ka=ka+1:ifka=1then1380
  133. 1410 ifa$="a"thendt=0:goto1440
  134. 1420 ifa$="d"thendt=1:goto1440
  135. 1430 ifa$="h"thendt=2:goto1440
  136. 1434 goto1470
  137. 1440 print"[159]          [196]rive"dv"contains a "
  138. 1450 print:print"       "dt$(dt):print
  139. 1460 return
  140. 1470 print"[147]    [150][197]rror!!![155]  [196]irectory type unkown."
  141. 1490 print"    [208]ress a key to start over.
  142. 1500 [161]a$:[139]a$[178]""[167]1500
  143. 1510 [138]
  144. 10000 dv[178][194](186):[159]15,dv,15,"s0:file cpr":[160]15:[148]"file cpr",dv:[128]
  145.